<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML>
<html>
  <head>
    <base href="<%=basePath%>">   
    <title>member_manage</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">  
	
	<link rel="stylesheet" type="text/css" href="css/maintable.css" ></link>
	<script type="text/javascript" src="js/My97DatePicker/WdatePicker.js"></script>  
	<script type="text/javascript" src="js/jquery-1.8.0.js"></script> 
	
	<style type="text/css">
		.div_check{
			padding-left:20px;
			padding-top:5px;
			padding-bottom:5px;
			background:#D3EAEF;
			font-size:12px;
			font-weight:normal;
			height:25px;
		}
	</style>
	
	<script type="text/javascript">
		$(function(){
			$("#ch_checkall,#top_ch_checkall").click(function(){
				if(this.checked){
					$("input[name=ck_id]").attr("checked","checked");
				}else{
					$("input[name=ck_id]").removeAttr("checked");
				}		
			});
					
			$("table tr").mouseover(function(){
				$(this).css("background","#D3EAEF");
				$(this).siblings().css("background","white");
			});
		});
	</script>
  </head>
  
  <body>
	<div class ="div_title">
		<div class="div_titlename"> <img src="images/san_jiao.gif" ><span>会员列表</span></div>
	</div>
	<form action="MemberServlet.do" method="post">
		<input type="hidden" name="flag" value="manage">
		<div class="div_check">
			会员账号：<input type="text" name="memberNo" value="${param.memberNo }"> &nbsp;&nbsp;
			注册日期：从&nbsp;<input type="text" name="beginDate" onclick="WdatePicker()" value="${param.beginDate}" >&nbsp;到&nbsp;<input name="endDate"  onclick="WdatePicker()" value="${param.endDate}"><button value="submit">查询</button>
		</div>		 
	  	<table  class="main_table">
	  		<tr>
	  			<th>账号</th>
	  			<th>姓名</th>
	  			<th>电话</th>
	  			<th>邮箱</th>
	  			<th>注册日期</th>
	  			<th>会员等级</th>
	  			<th>操作</th>
	  		</tr>
	  		
	  		<c:forEach var="member"  items="${memberList}"    >
		  		<tr>
		  			<td>${member.memberNo}</td>
		  			<td>${member.memberName }</td>
		  			<td>${member.phone }</td>
		  			<td>${member.email }</td>
		  			<td>${member.registerDate }</td>
		  			<td>${member.memberLevel }</td>
		  			<td>
	 					<a href="MemberServlet.do?flag=show&id=${member.id }">查看</a> |
		 			    <a href="javascript:del(${member.id })">删除</a> 
		  			</td>
		  		</tr>	
	  		</c:forEach>	
	  	</table>
	</form>
	<script>
		 var str="${msg }";
		 if(str!=""){
			 alert(str);
		 }
	</script>
  </body>
</html>
